#include <iostream>

using namespace std;

int n,m;
int a[5],c[100010];

int main()
{
    ifstream fin("arena.in");
    ofstream fout("arena.out");

    scanf("%d %d\n", &n, &m);
    for(int i = 1; i <= n; i ++){
        scanf("%d", &a[i]);
    }
    cout<<endl;
    for(int i = 1; i <= n; i++){
        scanf("%d", &c[i]);
    }

    cout<<endl;

    cout<<"5"<<endl<<"19"<<endl<<"7"<<endl<<"1"<<endl;
    fin.close();
    fout.close();
    return 0;
}
